/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_httpd.htm
 *
 * Zhiqim Httpd is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.httpd.constants;

import java.util.HashMap;

import org.zhiqim.httpd.HttpdConstants;

/**
 * HTTP处理步骤
 *
 * @version v1.0.0 @author zouzhigang 2014-3-21 新建与整理
 */
public class HttpStep implements HttpdConstants
{
    private static final HashMap<Integer, String> _statusMsg = new HashMap<Integer, String>();
    
    static
    {
        _statusMsg.put(_01_CREATE_,                     _01_STEP_DESC_);
        _statusMsg.put(_02_PARSE_HEADER_,               _02_STEP_DESC_);
        _statusMsg.put(_03_CHECK_HEADER_,               _03_STEP_DESC_);
        _statusMsg.put(_04_QUERY_CONTEXT_,              _04_STEP_DESC_);
        _statusMsg.put(_05_QUERY_HANDLER_,              _05_STEP_DESC_);
        _statusMsg.put(_06_PARSE_CONTENT_,              _06_STEP_DESC_);
        _statusMsg.put(_07_HANDLER_BEGIN_,              _07_STEP_DESC_);
        _statusMsg.put(_08_INTERCEPTOR_,                _08_STEP_DESC_);
        _statusMsg.put(_09_ACTION_,                     _09_STEP_DESC_);
        _statusMsg.put(_10_HANDLER_END_,                _10_STEP_DESC_);
        _statusMsg.put(_11_COMMITTED_,                  _11_STEP_DESC_);
        _statusMsg.put(_12_FINISHED_,                   _12_STEP_DESC_);
    }
    
    public static final String getStatusMsg(int code)
    {
        String desc = _statusMsg.get(code);
        return desc==null?""+code:desc;
    }
}
